-
Notifications
You must be signed in to change notification settings - Fork 846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Pylint Errors in Dev #2669
Fix Pylint Errors in Dev #2669
Conversation
Signed-off-by: Isaac Milarsky <[email protected]>
@@ -1,4 +1,5 @@ | |||
import logging | |||
import math | |||
from flask import Flask, render_template, render_template_string, request, abort, jsonify, redirect, url_for, session, flash | |||
from sqlalchemy.orm.exc import NoResultFound | |||
from .utils import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
E0402: Attempted relative import beyond top-level package (relative-beyond-top-level)
@@ -1,4 +1,5 @@ | |||
import logging | |||
import math | |||
from flask import Flask, render_template, render_template_string, request, abort, jsonify, redirect, url_for, session, flash | |||
from sqlalchemy.orm.exc import NoResultFound | |||
from .utils import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
W0401: Wildcard import utils (wildcard-import)
@@ -1,6 +1,7 @@ | |||
from pathlib import Path | |||
from concurrent.futures import ThreadPoolExecutor | |||
from flask import render_template, flash, url_for, Flask | |||
from .init import init_logging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
E0402: Attempted relative import beyond top-level package (relative-beyond-top-level)
@@ -1,6 +1,7 @@ | |||
from pathlib import Path | |||
from concurrent.futures import ThreadPoolExecutor | |||
from flask import render_template, flash, url_for, Flask | |||
from .init import init_logging | |||
from .init import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
E0402: Attempted relative import beyond top-level package (relative-beyond-top-level)
@@ -1,6 +1,7 @@ | |||
from pathlib import Path | |||
from concurrent.futures import ThreadPoolExecutor | |||
from flask import render_template, flash, url_for, Flask | |||
from .init import init_logging | |||
from .init import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
W0401: Wildcard import init (wildcard-import)
@@ -1,6 +1,7 @@ | |||
from pathlib import Path | |||
from concurrent.futures import ThreadPoolExecutor | |||
from flask import render_template, flash, url_for, Flask | |||
from .init import init_logging | |||
from .init import * | |||
from ..server import app, db_session |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
E0402: Attempted relative import beyond top-level package (relative-beyond-top-level)
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
@@ -76,7 +76,16 @@ def retrieve_all_pr_data(repo_git: str, logger, key_auth) -> None: | |||
|
|||
|
|||
def process_pull_requests(pull_requests, task_name, repo_id, logger, augur_db): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
R0914: Too many local variables (32/30) (too-many-locals)
Signed-off-by: Isaac Milarsky <[email protected]>
Returns: | ||
Sum of issues and prs for that repo | ||
""" | ||
|
||
from augur.tasks.github.util.gh_graphql_entities import GitHubRepo as GitHubRepoGraphql |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
C0415: Import outside toplevel (augur.tasks.github.util.gh_graphql_entities.GitHubRepo) (import-outside-toplevel)
Signed-off-by: Isaac Milarsky <[email protected]>
@@ -37,9 +41,9 @@ def root(path=""): | |||
def logo(brand=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
C0116: Missing function or method docstring (missing-function-docstring)
Signed-off-by: Isaac Milarsky <[email protected]>
@@ -6,8 +6,8 @@ | |||
|
|||
|
|||
class GitlabRandomKeyAuth(RandomKeyAuth): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
R0903: Too few public methods (1/2) (too-few-public-methods)
key_auth: GitLab specific key auth retrieval collection | ||
logger: logging object | ||
platform_id: GitLab specific platform id (github is 1) | ||
""" | ||
|
||
def __init__(self, logger): | ||
|
||
from augur.tasks.init.celery_app import engine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
C0415: Import outside toplevel (augur.tasks.init.celery_app.engine) (import-outside-toplevel)
@@ -73,7 +89,17 @@ def retrieve_all_gitlab_issue_data(repo_git, logger, key_auth) -> None: | |||
return all_data | |||
|
|||
def process_issues(issues, task_name, repo_id, logger, augur_db) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
@@ -186,7 +228,7 @@ def retrieve_all_gitlab_issue_comments(key_auth, logger, issue_ids, repo_git): | |||
|
|||
for id in issue_ids: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
W0622: Redefining built-in 'id' (redefined-builtin)
@@ -283,6 +351,16 @@ def collect_merge_request_reviewers(mr_ids, repo_git) -> int: | |||
logger.info(f"{owner}/{repo} has no gitlab merge request reviewers") | |||
|
|||
def process_mr_reviewers(data, task_name, repo_id, logger, augur_db): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
W0613: Unused argument 'task_name' (unused-argument)
@@ -283,6 +351,16 @@ def collect_merge_request_reviewers(mr_ids, repo_git) -> int: | |||
logger.info(f"{owner}/{repo} has no gitlab merge request reviewers") | |||
|
|||
def process_mr_reviewers(data, task_name, repo_id, logger, augur_db): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
W0613: Unused argument 'logger' (unused-argument)
Signed-off-by: Isaac Milarsky <[email protected]>
else: | ||
logger.info(f"{owner}/{repo} has no gitlab merge request reviewers") | ||
|
||
def process_mr_reviewers(data, task_name, repo_id, logger, augur_db): | ||
def process_mr_reviewers(data, repo_id, logger, augur_db): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
W0613: Unused argument 'logger' (unused-argument)
Signed-off-by: Isaac Milarsky <[email protected]>
Description
Signed commits